package cn.com.w.common.Utils;

import cn.hutool.crypto.SecureUtil;

/**
 * @author w
 * @Description:
 * @DateTime: 2025 05 07 12:46
 **/
public class PasswordUtils {

    /**
     * @author w
     * @Description: 加密 sha-256 方式
     * @DateTime: 2025 05 07 12:49
     * @Params: [password]
     * @Return java.lang.String
     */
    public static String encryptionPassword(String password) {
        try {
            return SecureUtil.sha256(password);
        } catch (Exception e) {
            e.printStackTrace();
            System.out.println("加密失败");
            return password;
        }
    }
}